package com.cnap.multiclouldmgmt.model.enums;
/**
 * 枚举类型
 * @author dyq
 */
public enum NetCostTypeEnum {

    Flow("流量计费","Flow"),

    Bandwidth("固定带宽","BandWidth");

    private String chineseDescribe;

    private String describe;

    NetCostTypeEnum(String chineseDescribe, String describe) {

        this.chineseDescribe = chineseDescribe;
        this.describe = describe;
    }

    /**
     * get
     *
     * @return ChineseDescribe
     */
    public String getChineseDescribe() {
        return chineseDescribe;
    }

    /**
     * set
     *
     * @param chineseDescribe chineseDescribe
     */
    public void setChineseDescribe(String chineseDescribe) {
        this.chineseDescribe = chineseDescribe;
    }

    /**
     * get
     *
     * @return Describe
     */
    public String getDescribe() {
        return describe;
    }

    /**
     * set
     *
     * @param describe describe
     */
    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public static String getChineseDescribeByDescribe(String describe){

        for(NetCostTypeEnum enumObj : NetCostTypeEnum.values()){

            if (enumObj.getDescribe().equals(describe)){

                return enumObj.getChineseDescribe();
            }
        }

        return describe;
    }

    public static String getDescribeByChineseDescribe(String chineseDescribe){

        for(NetCostTypeEnum enumObj : NetCostTypeEnum.values()){

            if (enumObj.getChineseDescribe().equals(chineseDescribe)){

                return enumObj.getDescribe();
            }
        }

        return Flow.describe;
    }
}
